package MST;

public class MST1716 {
    public int massage(int[] nums) {
        int len=nums.length;
        int[][] dp = new int[len + 1][2];
        for (int i = 0; i < len; i++) {
            dp[i + 1][0] = Math.max(dp[i][0],dp[i][1]);
            dp[i + 1][1] = dp[i][0] + nums[i];
        }
        return Math.max(dp[len][0],dp[len][1]);
    }


}
